<?php
defined('IN_IA') or exit('Access Denied');
!(defined('UNPOR_ROOT')) && define('UNPOR_ROOT', IA_ROOT . '/addons/unpor_baby/');
!(defined('UNPOR_TABLEPRE')) && define('UNPOR_TABLEPRE', 'unpor_baby_');
!(defined('UNPOR_BABY_LOCAL')) && define('UNPOR_BABY_LOCAL', '../addons/unpor_baby/');
!(defined('UNPOR_BABY_LOCAL_STATIC')) && define('UNPOR_BABY_LOCAL_STATIC', UNPOR_BABY_LOCAL.'template/static/');
!(defined('UNPOR_ROOT_CORE')) && define('UNPOR_ROOT_CORE', UNPOR_ROOT.'core/');


/**
 * 静态变量
 */
define('SUCCESS', 1);
define('FAIL', 0);


function kit_crumbs_navigation($go = 'main', $dodo = 'home', $operate = ''){
    // 面包屑导航
    $crumbs = '<a><cite>首页</cite></a>';
    // 当前页面的名称
    $pageName = '';
    switch ($go) {
        case 'user':
            $crumbs = $crumbs . '<span lay-separator="">/</span><a><cite>会员管理</cite></a>';
            switch ($dodo) {
                case 'member':
                    $crumbs = $crumbs . '<span lay-separator="">/</span><a><cite>会员列表</cite></a>';
                    switch ($operate) {
                        case 'add':
                            $crumbs = $crumbs . '<span lay-separator="">/</span><a><cite>添加</cite></a>';
                            break;
                        case 'update':
                            $crumbs = $crumbs . '<span lay-separator="">/</span><a><cite>修改</cite></a>';
                            break;
                        default:
                            break;
                    }
                    $pageName = '会员列表'; // 当前页面设置
                    break;
                case 'grade':
                    $crumbs = $crumbs . '<span lay-separator="">/</span><a><cite>会员等级</cite></a>';
                    switch ($operate) {
                        case 'add':
                            $crumbs = $crumbs . '<span lay-separator="">/</span><a><cite>添加</cite></a>';
                            break;
                        case 'update':
                            $crumbs = $crumbs . '<span lay-separator="">/</span><a><cite>修改</cite></a>';
                            break;
                        default:
                            break;
                    }
                    $pageName = '会员等级';
                    break;
                default:
                    break;
            }
            break;
        default:
            break;
    }
    $pageObj = array('crumbs' => $crumbs, 'pageName' => $pageName);
    return $pageObj;
}
?>